#include <iostream>
#include <cmath>
using namespace std;
int x1, x2;
int y_1, y_2;
int main(){
	cin >> x1 >> y_1 >> x2 >> y_2;
	int l1 = pow(x1, 2) + pow(y_1, 2);
	int l2 = pow(x2, 2) + pow(y_2, 2);
	int l3 = pow((x2 - x1), 2) + pow((y_2 - y_1), 2);
	if ((l1 + l2 == l3) || (l1 + l3 == l2) || (l2 + l3 == l1)) cout << "YES" << endl;
	else cout << "NO" << endl;

    return 0;
}


